#ifndef DRIVERLOADER_H
#define DRIVERLOADER_H

#include <string>
#include <windows.h>

using namespace std;

class CDriverLoader
{
public:
	enum ErrorCodes
	{
		Successfull,
		BadHandle,

	};
	CDriverLoader();
	
	DWORD InstallDriver(IN LPCWSTR DriverName, IN LPCWSTR ServiceExe);
	DWORD RemoveDriver(IN LPCWSTR DriverName);
	DWORD StartDriver(IN LPCWSTR DriverName);
	DWORD StopDriver(IN LPCWSTR DriverName);
	DWORD OpenDevice(HANDLE* pDeviceHandle, IN LPCWSTR DriverName);

	DWORD RegisterDriver(IN LPCWSTR DriverName, IN LPCWSTR ServiceExe);
	DWORD UnRegisterDriver(IN LPCWSTR DriverName);

	wstring GetLastDriverError();

	~CDriverLoader();

private:
	SC_HANDLE schSCManager;
	DWORD err;

};

#endif // DRIVERLOADER_H
